package week9.q4;

public class Car extends  Vehicle implements IPower {
    private  String carNumber;
    public Car(String color,String brand, String carNumber) {
        super(brand, color);
        this.carNumber=carNumber;
    }

    public String getCarNumber() {
        return carNumber;
    }

    public void setCarNumber(String carNumber) {
        this.carNumber = carNumber;
    }

    @Override
    public void power() {
        System.out.println(getBrand()+"正在加92油");
    }

    @Override
    public void run() {
        System.out.println(getColor()+getBrand()+getCarNumber());
    }
}
